package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单
 */
@Data
public class OrderInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 订单编号
     */
    private String orderCode;

    /**
     * 购买人id
     */
    private Integer buyerId;

    /**
     * 微信openid
     */
    private String openid;

    /**
     * 购买人姓名
     */
    private String buyerName;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 可分配数量
     */
    private Integer distributionNum;


    /**
     * 商品id
     */
    private Integer productId;

    /**
     * 商品名称
     */
    private String productName;


    /**
     * 商品分类
     */
    private String productCategory;

    /**
     * 商品封面
     */
    private String productImage;


    /**
     * 学时
     */
    private Integer classHours;

    /**
     * 订单分类
     */
    private Integer orderType;

    private Integer buyType;

    private Integer buyTypeNum;

    /**
     * 售价
     */
    private BigDecimal price;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice;

    /**
     * 订单状态
     */
    private Integer orderStatus;

    /**
     * 支付状态
     */
    private Integer payStatus;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String payTime;

    /**
     * 简介
     */
    private String content;

    /**
     * 讲师
     */
    private String lecturer;

    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
     * 支付凭证
     */
    private String payOrder;

    private Integer payType;// '支付渠道：0线上,1线下';
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String expireTime;// '到期时间';



}
